package java68_2;

import java.util.Scanner;

public class Lingxing {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int h=0;
        while(true) {
            System.out.println("请输入高度:");
            h = in.nextInt();
            if(h%2==1 &&h>1)
                break;
            System.out.println("重来...");
        }
        int rows=h/2+1;
        for(int i=1;i<=rows;i++){
            for(int j=rows-i;j>=1;j--){//+1
                System.out.print(" ");
            }
            for (int j = 1; j <= 2 * i - 1; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
        //下半部分
        rows--;
        for(int i=1;i<=rows;i++){
            for(int j=1;j<=i;j++) {
                System.out.print(" ");
            }

            /////
            for(int j=1;j<=2*(rows-i+1)-1;j++){
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
